const mongoose = require("mongoose");
const addressesSchema = new mongoose.Schema({//创建骨架
    name: String,      // 收件人名称
    phone: String,     // 收件人联系电话
    address: String,    // 收件人地址
    userId: { type: mongoose.Schema.Types.ObjectId, ref: "users" }   // 所属用户 id
}, { versionKey: false });
//根据骨架创建模板
const addressesModel = mongoose.model('addresses', addressesSchema, "addresses");